/**
 * CC_Model_PartOfFile.java
 */
package commands.controller;
import dataTypes.*;


/**
 * A command returning requested part of the file.
 * @author Michal Kolodziejski
 */
public class CC_Model_PartOfFile extends ControllerCommand {
	/** A file of which a part was requested. */
	private File file;
	/** A number of requested part. */
	private int partNumber;
	/** Data of requested part. */
	private byte[] data;
	
	
	/**
	 * Constructor
	 * @param file a file of which a part was requested
	 * @param partNumber a number of requested part
	 * @param data data of requested part 
	 */
	public CC_Model_PartOfFile(File file, int partNumber, byte[] data){
		super(ControllerCommandType.MODEL_PART_OF_FILE);
		this.file = file;
		this.partNumber = partNumber;
		this.data = data;
	}


	/**
	 * @return the data of requested part
	 */
	public byte[] getData() {
		return data;
	}


	/**
	 * @return the file of which a part was requested
	 */
	public File getFile() {
		return file;
	}


	/**
	 * @return the number of requested part
	 */
	public int getPartNumber() {
		return partNumber;
	}

}
